import java.nio.FloatBuffer;

import org.lwjgl.BufferUtils;

public final class FrameData {

	private FloatBuffer verts;
	private FloatBuffer norms;
	private FloatBuffer coords;
	private FloatBuffer disp;
	private FloatBuffer cols;

	public FrameData(float[] v, float[] n, float[] u, float[] c) {
		verts = BufferUtils.createFloatBuffer(v.length);
		verts.put(v);
		verts.rewind();
		norms = BufferUtils.createFloatBuffer(n.length);
		norms.put(n);
		norms.rewind();
		coords = BufferUtils.createFloatBuffer(u.length);
		coords.put(u);
		coords.rewind();
		cols = BufferUtils.createFloatBuffer(c.length);
		cols.put(c);
		cols.rewind();
	}

	// accessor methods
	public FloatBuffer getVerts() {
		verts.rewind();
		return verts;
	}

	public FloatBuffer getNorms() {
		norms.rewind();
		return norms;
	}

	public FloatBuffer getCoords() {
		coords.rewind();
		return coords;
	}

	public FloatBuffer getDisp() {
		disp.rewind();
		return disp;
	}

	public FloatBuffer getCols() {
		cols.rewind();
		return cols;
	}

}
